#ifndef WINDOW_H
#define WINDOW_H

#include "touchbutton.h"
#include <QLabel>
#include <QObject>
#include <QPushButton>
#include <QWidget>

enum WindowType{
    Window_Video = 0,
    Window_Urdf,
    Window_Slam
};

class Window:public QWidget
{
    Q_OBJECT
public:
    Window(WindowType type, QWidget* parent = nullptr, int nID = 0, QString strName="",QString strUrl = "");
    ~Window();

    int nID() const;

    QString strName() const;

    void setBMax(bool newBMax);

signals:
    void closeClicked(Window * p);
    void windowClicked(Window * p);

protected:
    TouchButton * m_pCloseBtn;
    WindowType m_nType;
    int m_nID;
    QString m_strName;
    bool m_bMax;

    QWidget * m_pWidget;
    // QWidget interface
protected:
    void mousePressEvent(QMouseEvent *event);
    void resizeEvent(QResizeEvent *event);
    void showEvent(QShowEvent *event);

};

#endif // WINDOW_H
